package ${domain}.module.wsys.req;

import org.hibernate.validator.constraints.Length;
import ${domain}.frame.base.BaseUpdateRequest;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * UserRoleUpdateRequest - 用户角色授权更新
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class UserRoleUpdateRequest extends BaseUpdateRequest {

    /**
     * 主键
     */
    @NotNull(message = "[id]主键不能为NULL")
    private Long id;

    /**
     * 用户主键
     */
    @NotNull(message = "[userId]用户主键不能为NULL")
    private Long userId;

    /**
     * 用户代码
     */
    @NotBlank(message = "[userCode]用户代码不能为空")
    @Length(min = 0, max = 50, message = "[userCode]用户代码长度不合法(0-50)")
    private String userCode;

    /**
     * 角色主键
     */
    @NotNull(message = "[roleId]角色主键不能为NULL")
    private Long roleId;

    /**
     * 角色代码
     */
    @NotEmpty(message = "[roleCode]角色代码不能为空")
    @Length(min = 0, max = 50, message = "[roleCode]角色代码长度不合法(0-50)")
    private String roleCode;

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserCode() {
        return this.userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public Long getRoleId() {
        return this.roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getRoleCode() {
        return this.roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }
}
